<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Cover')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-image" class="form-control" size="50" name="row[cover]" type="text" value="{$row.cover|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-image" class="btn btn-danger plupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-image"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-image"></ul>
        </div>
    </div>


    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Author')}:</label>
        <div class="col-xs-12 col-sm-8">
            <!--<input id="c-author" class="form-control" name="row[author]" type="text" value="{$row.author|htmlentities}">-->
            <input id="c-author" data-source="books/book/selectAuthor?model=member" data-field="pen_name" data-primary-key="id" class="form-control selectpage" name="row[m_id]" type="text" value="{$row.m_id|htmlentities}">
        </div>
    </div>


    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Cate_name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <!--<input id="c-cate_name" class="form-control" name="row[cate_name]" type="text" value="{$row.cate_name|htmlentities}">-->
            <input id="c-cate_id" data-source="books/book/selectCate?model=cate" data-field="name" data-primary-key="id" class="form-control selectpage" name="row[cate_id]" type="text" value="{$row.cate_id|htmlentities}">
        </div>
    </div>



    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Descr')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-descr" class="form-control" name="row[descr]" type="text" value="{$row.descr|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Recommendation')}:</label>
        <div class="col-xs-12 col-sm-8">
            <!--<input id="c-recommendation" class="form-control" name="row[recommendation]" type="number" value="{$row.recommendation|htmlentities}">-->
            {:build_radios('row[recommendation]', ['0'=>'下架', '1'=>'上架'],$row.recommendation)}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Original')}:</label>
        <div class="col-xs-12 col-sm-8">
            <!--<input id="c-original" class="form-control" name="row[original]" type="number" value="{$row.original|htmlentities}">-->
            {:build_radios('row[original]', ['0'=>'下架', '1'=>'上架'],$row.original)}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Original_new')}:</label>
        <div class="col-xs-12 col-sm-8">
            <!--<input id="c-original_new" class="form-control" name="row[original_new]" type="number" value="{$row.original_new|htmlentities}">-->
            {:build_radios('row[original_new]', ['0'=>'下架', '1'=>'上架'],$row.original_new)}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('New')}:</label>
        <div class="col-xs-12 col-sm-8">
            <!--<input id="c-new" class="form-control" name="row[new]" type="number" value="{$row.new|htmlentities}">-->
            {:build_radios('row[new]', ['0'=>'下架', '1'=>'上架'],$row.new)}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Recently')}:</label>
        <div class="col-xs-12 col-sm-8">
            <!--<input id="c-recently" class="form-control" name="row[recently]" type="number" value="{$row.recently|htmlentities}">-->
            {:build_radios('row[recently]', ['0'=>'下架', '1'=>'上架'],$row.recently)}
        </div>
    </div>


    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Complete')}:</label>
        <div class="col-xs-12 col-sm-8">
            <!--<input id="c-complete" class="form-control" name="row[complete]" type="number" value="{$row.complete|htmlentities}">-->
            {:build_radios('row[complete]', ['0'=>'否', '1'=>'是'],$row.complete)}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('More_list')}:</label>
        <div class="col-xs-12 col-sm-8">
            <!--<input id="c-more_list" class="form-control" name="row[more_list]" type="number" value="{$row.more_list|htmlentities}">-->
            {:build_radios('row[more_list]', ['0'=>'下架', '1'=>'上架'],$row.more_list)}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('New_book_list')}:</label>
        <div class="col-xs-12 col-sm-8">
            <!--<input id="c-new_book_list" class="form-control" name="row[new_book_list]" type="number" value="{$row.new_book_list|htmlentities}">-->
            {:build_radios('row[new_book_list]', ['0'=>'下架', '1'=>'上架'],$row.new_book_list)}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Ticket_list')}:</label>
        <div class="col-xs-12 col-sm-8">
            <!--<input id="c-ticket_list" class="form-control" name="row[ticket_list]" type="number" value="{$row.ticket_list|htmlentities}">-->
            {:build_radios('row[ticket_list]', ['0'=>'下架', '1'=>'上架'],$row.ticket_list)}
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Auto_free')}:</label>
        <div class="col-xs-12 col-sm-8">
            <!--<input id="c-ticket_list" class="form-control" name="row[ticket_list]" type="number" value="{$row.ticket_list|htmlentities}">-->
            {:build_radios('row[auto_free]', ['0'=>'否', '1'=>'是'],$row.auto_free)}
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Update')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-update" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[update]" type="text" value="{$row.update}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Words')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-words" class="form-control" name="row[words]" min="0" type="number" value="{$row.words|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Tuijian')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-tuijian" class="form-control" min="0" name="row[tuijian]" type="number" value="{$row.tuijian|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Dasang')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-dasang" class="form-control" min="0" name="row[dasang]" type="number" value="{$row.dasang|htmlentities}">
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
